// main.ts
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'
// 引入路由配置
import router from './router/index'
// 引入文件
import App from './App.vue'
import axios from './config/axios'
import { useRouter } from "vue-router";
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import func from './config/func'

const app = createApp(App)

app.config.globalProperties.$axios = axios
app.config.globalProperties.$router = useRouter()
app.config.globalProperties.$func = func

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(ElementPlus,{
    locale: zhCn,
})
// 注册router
app.use(router)

app.mount('#app')
